custedit Customer View/Edit Form1 ButtonFind custnumber Label1 Number: lastname ButtonPrior &Prior ButtonNext &Next Label2 Last name: firstname Label3 First name: ButtonFirst &First ButtonLast &Last address Label4 Address: ButtonEdit &Edit Label5 City: Label6 ButtonNew Label7 Tapes out: tapes_out Label8 YTD Spent: total_spent ButtonOK ButtonCancel &Cancel ButtonDelete &Delete ButtonDone E&xIt Text1_Change ButtonFirst_Clicki GetCustomerRecW DBFIRST custnumber custrecN custnumer custlastname lastname custfirstname firstnameC ButtonDone_Click* custedit FieldsToForm DB_OKa ButtonNext_Clickv DBNEXT ButtonPrior_Click DBPRIOR ButtonLast_Click last4 DBLASTB ButtonEdit_Click DoEditMode ButtonFirst{ visible FALSE ButtonNext ButtonPriorx Button& ButtonLastV ButtonEdit< ButtonDone ButtonOK TURE% ButtonCancel iEditMode, iViewMode DoViewMode ButtonOK_Click| ButtonCancel_ClickL UpdateRec CUSTOMER_TABLE Form_Click Form_LinkClose @ Form_Load addressa FormToFields ButtonDelete, UpdateCustomerRec ButtonFind ButtonNew ButtonFind_Click DBKEY$ DBKEYED> ButtonNew_Click SetEditMode EDIT_MODE ADD_MODE VIEW_MODE modeP enabled iMode. numvalue blankcustrecT AddCustomerRec ButtonDelete_Click DeleteCustomerRec savecustrec MB_OKCANCEL IDCANCEL VIEWMODE custnumber_Change8 MB_ICONQUESTION GetCustomerRecForUpdate UnlockRec MousePointerE POINTER_HOURGLASS POINTER_DEFAULT screen tapes_out caption total_spentZ ButtonFirst_Click ButtonDone_Click FieldsToForm ButtonNext_Click ButtonPrior_Click ButtonLast_Click ButtonEdit_Click Move the fields to the form againa In a network environment, someone could have changed the record since last time is was showns ButtonOK_Click Assume if one of these failed, a message was already displayed as part of the function. What to do if the add or update failed?i For now invoke the CANCEL routine as thoughh the user clicked the cancel button.s Return to view mode ButtonCancel_Click Form_Load FormToFields ButtonFind_Click SetEditMode If a record was locked, unlock itt this may already have been done, but make the function call again to be safe... Set global value as mode indicator ButtonNew_Click ButtonDelete_Click check if user pressed OK or CANCEL OK to delete?" DELETE Delete failed, code: "